package ooday02;

public class Animal {//超类
    String name;
    int age;
    String color;
    String food;
    Animal(String name,int age, String color,String food){
        this.name=name;
        this.age= age;
        this.color=color;
        this.food=food;

    }
    void drink(){
        System.out.println("一只"+color+"色的，"+age+"岁的，名字叫"+name+"的在喝水");
    }
    void eat(){
        System.out.println("一只名字叫"+name+"的，它的年龄是"+age+"岁，颜色是"+color+"的,正在嘎嘎炫"+food);
    }
}
